package com.jianan.mis.service;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.jianan.mis.data.dao.base.PageControl;
import com.jianan.mis.data.domain.OsContract;
import com.jianan.mis.data.domain.OsContractFinanceDetail;
import com.jianan.mis.data.domain.OsContractMaterial;
import com.jianan.mis.data.domain.OsContractPlan;
import com.jianan.mis.data.domain.OsContractSurvey;

public interface OsContractService {
	
	public Serializable save(OsContract osContract);
	
	public void update(OsContract osContract);
	
	public void remove(OsContract osContract);

	public List<OsContract> getAll();

	public List<OsContract> getByStates(int[] states);

	public void pageQuery(PageControl pageControl, Map conditions);
	
	public void savePlan(OsContract osContract);
	
	public void updatePlan(OsContractPlan osContractPlan);
	
	public OsContractPlan getPlan(OsContract osContract);
	
	public void updateMaterials(OsContract osContract, List<OsContractMaterial> materials);
	
	public List<OsContractMaterial> getMaterials(OsContract osContract);
	
	public void updateSurveys(OsContract osContract, List<OsContractSurvey> surveys);
	
	public List<OsContractSurvey> getSurveys(OsContract osContract);
	
	public void updateFinanceDetails(OsContract osContract, List<OsContractFinanceDetail> details);
	
	public List<OsContractFinanceDetail> getFinanceDetails(OsContract osContract);
	
	public List getStat(Map conditions);
	
	public void updateExpired();
	
	public List<OsContract> getOver20Contracts();
	
	public boolean checkContractNoExists(String contractNo);
}
